// Control types
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUT_BUTTON 16
//Arma 2 - textured button
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
#define FontM "Zeppelin32"

#define true 1
#define false 0

// ------- CUSTOM CONSTANTS ---------------------------------------------------

#define ControlFontSize 0.025

// ------------------- CONSTANT END -------------------------------------------

// --------------------- COMBOBOX CONTROL -------------------------------------

class RscListCtrl {
    idc = -1;
    style = ST_LEFT;

    // position
    x = 0.1;
    y = 0.1;
    w = 0.2;

    // size
    sizeEx = ControlFontSize;
    rowHeight = ControlFontSize;
    wholeHeight = 4 * ControlFontSize;

    // font
    font = FontM;

    // colors
    color[] = {Dlg_Color_White, 1};
    colorText[] = {Dlg_Color_Black, 1};
    colorBackground[] = {Dlg_Color_White, 1};
    colorSelect[] = {Dlg_Color_White, 1};
    colorSelectBackground[] = {Dlg_Color_Black, 1};

    // sound
    soundSelect[] = {"\ca\ui\data\sound\mouse3", 0.2, 1};
    soundExpand[] = {"\ca\ui\data\sound\mouse2", 0.2, 1};
    soundCollapse[] = {"\ca\ui\data\sound\mouse1", 0.2, 1};

};

class RscCombo : RscListCtrl {
    type = CT_COMBO;

    h = ControlFontSize;

};

class RscListBox : RscListCtrl {
    type = CT_LISTBOX;

    h = 4 * ControlFontSize;

    //style = LB_TEXTURES;
};

//-------------------------------- BACK ---------------------------------------

class RscBack {
    idc = -1;
    type = CT_STATIC;
    style = ST_CENTER;

    colorText[] = {0, 0, 0, 1};
    colorBackground[] = {1, 1, 1, 0.75};

    x = 0;
    y = 0;
    w = 0.1;
    h = 0.1;

    // font
    font = FontM;
    sizeEx = 0.05;

    text = "";
};

//-------------------------------- BUTTON ---------------------------------------


class RscButton {
    idc = -1;
    type = CT_BUTTON;
    style = ST_LEFT;
    default = false;
    font = FontM;
    sizeEx = ControlFontSize;
    colorText[] = {0, 0, 0, 1};
    colorFocused[] = {0.9, 0.9, 0.9, 1}; // border color for focused state
    colorDisabled[] = {0.5, 0.5, 0.5, 0.7}; // text color for disabled state
    colorBackground[] = {1, 1, 1, 0.8};
    colorBackgroundDisabled[] = {1, 1, 1, 0.5};    // background color for disabled state
    colorBackgroundActive[] = { 1, 1, 1, 1 };    // background color for active state
    offsetX = 0.003;
    offsetY = 0.003;
    offsetPressedX = 0.002;
    offsetPressedY = 0.002;
    colorShadow[] = {0, 0, 0, 0.5};
    colorBorder[] = {0, 0, 0, 1};
    borderSize = 0;
    soundEnter[] = {"", 0, 1};   // no sound
    soundPush[] = {"buttonpushed.ogg", 0.1, 1};
    soundClick[] = {"", 0, 1};   // no sound
    soundEscape[] = {"", 0, 1};  // no sound
//    x = 0.4;
//    y = 0.475;
//    w = 0.2;
    h = ControlFontSize+0.015;
    text = "RscButton";
    action = "player globalChat ""RscButton default action""";
};
//---------------------- MAP CONTROL ------------------------------------------

class RscMapControl {
    type = CT_MAP_MAIN;
    idc = -1;
    style = ST_PICTURE;

    x = 0.1;
    y = 0.1;
    w = 0.3;
    h = 0.3;

    colorSea[] = {0.56, 0.8, 0.98, 0.5};
    colorForest[] = {0.6, 0.8, 0.2, 0.5};
    colorRocks[] = {0.6, 0.45, 0.27, 0.4};
    colorCountlines[] = {0.7, 0.55, 0.3, 0.6};
    colorCountlinesWater[] = {0, 0.53, 1, 0.5};
    colorMainCountlines[] = {0.65, 0.45, 0.27, 1};
    colorMainCountlinesWater[] = {0, 0.53, 1, 1};
    colorPowerLines[] = {Dlg_Color_Black, 1};
    colorLevels[] = {Dlg_Color_Black, 1};
    colorForestBorder[] = {0.4, 0.8, 0, 1};
    colorRocksBorder[] = {0.6, 0.45, 0.27, 0.4};
    colorNames[] = {Dlg_Color_Black, 1};
    colorInactive[] = {Dlg_Color_White, 0.5};
    colorBackground[] = {Dlg_Color_White, 1};
    colorText[] = {Dlg_Color_White, 1};

    font = "Zeppelin32";
    sizeEx = 0.05;

    fontLabel = "Zeppelin32";
    sizeExLabel = 0.0286458;
    fontGrid = "Zeppelin32";
    sizeExGrid = 0.0286458;
    fontUnits = "Zeppelin32";
    sizeExUnits = 0.0286458;
    fontNames = "Zeppelin32";
    sizeExNames = 0.0286458;
    fontInfo = "Zeppelin32";
    sizeExInfo = 0.0286458;
    fontLevel = "Zeppelin32";
    sizeExLevel = 0.0286458;

    ptsPerSquareSea = 6;
    ptsPerSquareTxt = 8;
    ptsPerSquareCLn = 8;
    ptsPerSquareExp = 8;
    ptsPerSquareCost = 8;
    ptsPerSquareFor = "4.0f";
    ptsPerSquareForEdge = "10.0f";
    ptsPerSquareRoad = 2;
    ptsPerSquareObj = 10;

    text = "\ca\ui\data\map_background2_co.paa";
    ShowCountourInterval = 0;
    scaleDefault = 0.1;
    onMouseButtonClick = "";
    onMouseButtonDblClick = "";

    class ActiveMarker {
        color[] = {0.3, 0.1, 0.9, 1};
        size = 50;
    };

    class Legend {
        x = 0.729;
        y = 0.05;
        w = 0.237;
        h = 0.127;
        font = "Zeppelin32";
        sizeEx = 0.0208333;
        colorBackground[] = {0.906, 0.901, 0.88, 0.8};
        color[] = {Dlg_Color_Black, 1};
    };

    class Bunker {
        color[] = {0, 0.35, 0.7, 1};
        icon = "\ca\ui\data\map_bunker_ca.paa";
        size = 14;
        importance = 1.5 * 14 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Bush {
        icon = "\ca\ui\data\map_bush_ca.paa";
        color[] = {0.55, 0.64, 0.43, 1};
        size = 14;
        importance = 0.2 * 14 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class BusStop {
        icon = "\ca\ui\data\map_busstop_ca.paa";
        color[] = {0, 0, 1, 1};
        size = 10;
        importance = 1 * 10 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Command {
        icon = "#(argb,8,8,3)color(1,1,1,1)";
        color[] = {0, 0.9, 0, 1};
        size = 18;
        importance = 1;
        coefMin = 1;
        coefMax = 1;
    };

    class Cross {
        color[] = {0, 0.35, 0.7, 1};
        icon = "\ca\ui\data\map_cross_ca.paa";
        size = 16;
        importance = 0.7 * 16 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Fortress {
        icon = "\ca\ui\data\map_bunker_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 16;
        importance = 2 * 16 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Fuelstation {
        icon = "\ca\ui\data\map_fuelstation_ca.paa";
        color[] = {1.0, 0.35, 0.35, 1};
        size = 16;
        importance = 2 * 16 * 0.05;
        coefMin = 0.75;
        coefMax = 4;
    };

    class Fountain {
        icon = "\ca\ui\data\map_fountain_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 12;
        importance = 1 * 12 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Hospital {
        icon = "\ca\ui\data\map_hospital_ca.paa";
        color[] = {0.78, 0, 0.05, 1};
        size = 16;
        importance = 2 * 16 * 0.05;
        coefMin = 0.5;
        coefMax = 4;
    };

    class Chapel {
        icon = "\ca\ui\data\map_chapel_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 16;
        importance = 1 * 16 * 0.05;
        coefMin = 0.9;
        coefMax = 4;
    };

    class Church {
        icon = "\ca\ui\data\map_church_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 16;
        importance = 2 * 16 * 0.05;
        coefMin = 0.9;
        coefMax = 4;
    };

    class Lighthouse {
        icon = "\ca\ui\data\map_lighthouse_ca.paa";
        color[] = {0.78, 0, 0.05, 1};
        size = 20;
        importance = 3 * 16 * 0.05;
        coefMin = 0.9;
        coefMax = 4;
    };

    class Quay {
        icon = "\ca\ui\data\map_quay_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 16;
        importance = 2 * 16 * 0.05;
        coefMin = 0.5;
        coefMax = 4;
    };

    class Rock {
        color[] = {0.35, 0.35, 0.35, 1};
        icon = "\ca\ui\data\map_rock_ca.paa";
        size = 12;
        importance = 0.5 * 12 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Ruin {
        icon = "\ca\ui\data\map_ruin_ca.paa";
        color[] = {0.78, 0, 0.05, 1};
        size = 16;
        importance = 1.2 * 16 * 0.05;
        coefMin = 1;
        coefMax = 4;
    };

    class SmallTree {
        icon = "\ca\ui\data\map_smalltree_ca.paa";
        color[] = {0.55, 0.64, 0.43, 1};
        size = 12;
        importance = 0.6 * 12 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Stack {
        icon = "\ca\ui\data\map_stack_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 20;
        importance = 2 * 16 * 0.05;
        coefMin = 0.9;
        coefMax = 4;
    };

    class Tree {
        icon = "\ca\ui\data\map_tree_ca.paa";
        color[] = {0.55, 0.64, 0.43, 1};
        size = 12;
        importance = 0.9 * 16 * 0.05;
        coefMin = 0.25;
        coefMax = 4;
    };

    class Tourism {
        icon = "\ca\ui\data\map_tourism_ca.paa";
        color[] = {0.78, 0, 0.05, 1};
        size = 16;
        importance = 1 * 16 * 0.05;
        coefMin = 0.7;
        coefMax = 4;
    };

    class Transmitter {
        icon = "\ca\ui\data\map_transmitter_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 20;
        importance = 2 * 16 * 0.05;
        coefMin = 0.9;
        coefMax = 4;
    };

    class ViewTower {
        icon = "\ca\ui\data\map_viewtower_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 16;
        importance = 2.5 * 16 * 0.05;
        coefMin = 0.5;
        coefMax = 4;
    };

    class Watertower {
        icon = "\ca\ui\data\map_watertower_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 32;
        importance = 1.2 * 16 * 0.05;
        coefMin = 0.9;
        coefMax = 4;
    };

    class Waypoint {
        icon = "\ca\ui\data\map_waypoint_ca.paa";
        color[] = {0, 0.35, 0.7, 1};
        size = 32;
        coefMin = 1.00;
        coefMax = 1.00;
        importance = 1.00;
    };

    class WaypointCompleted {
        icon = "\ca\ui\data\map_waypoint_completed_ca.paa";
        color[] = {Dlg_Color_Black, 1};
        size = 24;
        importance = 1.00;
        coefMin = 1.00;
        coefMax = 1.00;
    };
};
//-------------------------------------

class RscMap {
    access = ReadAndWrite;

    class controls {

        class Map : RscMapControl {
            moveOnEdges = 0;
            x = 0;
            y = 0;
            w = 0.83;
            h = 1;
        };
    };
};

//-------------------------------------
